﻿/*****************************************************************//**
 * @file    FITKAcousticsVTKGraphObjectLoadPower.h
 * @brief   Graph object base for power load.
 *  
 * @author  ChengHaotian (yeguangbaozi@foxmail.com)
 * @date    2024-11-25
 *********************************************************************/

#ifndef __FITKAcousticsVTKGraphObjectLoadPower_H__
#define __FITKAcousticsVTKGraphObjectLoadPower_H__

#include "FITKAcousticsVTKGraphObjectPictureBase.h"

#include "FITKAcousticsVTKGraphAdaptorAPI.h"

// Forward declaration
namespace Acoustics
{
    class FITKAcousticsAbstractLoad;
}

namespace Exchange
{
    /**
     * @brief   Graph object base for power load.
     * @author  ChengHaotian (yeguangbaozi@foxmail.com)
     * @date    2024-11-25
     */
    class FITKACOUSTICSGRAPHADAPTORAPI FITKAcousticsVTKGraphObjectLoadPower : public FITKAcousticsVTKGraphObjectPictureBase
    {
        // Regist
        FITKGraphObjectRegist(FITKAcousticsVTKGraphObjectLoadPower, FITKAcousticsVTKGraphObjectPictureBase);
        FITKCLASS(Exchange, FITKAcousticsVTKGraphObjectLoadPower);

    public:
        /**
         * @brief   Constructor.
         * @param   power: The power load data object
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-25
         */
        FITKAcousticsVTKGraphObjectLoadPower(Acoustics::FITKAcousticsAbstractLoad* power);

        /**
         * @brief   Destructor.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-25
         */
        ~FITKAcousticsVTKGraphObjectLoadPower() = default;

        /**
         * @brief   Get the visibility from the data object.[override]
         * @return  The visibility
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-26
         */
        bool getDataVisibility() override;
        /**
         * @brief    刷新重写
         * @param[i] forceUpdate        是否强制刷新 
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-12-16
         */
        virtual void update(bool forceUpdate = false) override;
    private:
        /**
         * @brief   Initialize the vtk objects.[override]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-26
         */
        void init() override;

        /**
         * @brief   Unused.[override]
         * @return  Is the dataset valid
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-25
         */
        bool generateDataSet() override;

        /**
         * @brief   Get the enable flag from data object.[override]
         * @return  The enable flag
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-26
         */
        bool getDataEnabled() override;

    };
}   // namespace Exchange

#endif // __FITKAcousticsVTKGraphObjectLoadPower_H__
